<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        function deleteAttribute(){
            let del = document.querySelector("span");
            del.removeAttribute("style");
        }
        function deleteNodes(){
            del = document.querySelector("select");
            del.removeChild(del.children[1]);
        }
    </script>
</head>
<body>
<div>
    <span style="color: red; background-color: blue; font-size: 50px" name="test">一条测试语句</span>
    <select>
        <option id="op1" value="one">1</option>
        <option id="op2" value="two">2</option>
        <option id="op3" value="three">3</option>
    </select>
</div>
<button onclick="deleteAttribute()">点击删除属性</button>
<button onclick="deleteNodes()">点击删除节点</button>
</body>
</html>